package com.qixin.web.service;

import com.qixin.api.bean.FileResult;
import com.qixin.web.bean.WeUser;
import com.baomidou.mybatisplus.service.IService;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.io.UnsupportedEncodingException;
import java.sql.SQLException;

/**
 * <p>
 * 微信充电桩用户 服务类
 * </p>
 *
 * @author 张子艺
 * @since 2018-10-02
 */
public interface WeUserService extends IService<WeUser> {
    //上传
    FileResult fileUpload(MultipartFile multipartFile, String flag);
    // 发送短信验证码 并存入缓存
	  String SendSMS(Long phone);
    //注册企业用户
	  String insertPt(String param,String code,String url);
    //个人用户注册
	  String insertPeople(String param,String code,String b1url,String b2url,String c1url,String c2url) throws SQLException;
    //和cache中的验证码进行比对
    boolean equalsCache(String code,String phone);
    //登陆  判断是个人登陆还是企业登陆  flag1企业 2 个人
    String login(String userName,String passWord,String flag, HttpSession session);

    /**
     *
     * @param request
     * @param response
     * @param session

     * @return 返回出的页面
     */
    boolean weixinLogin(HttpServletRequest request, HttpServletResponse response, HttpSession session) throws UnsupportedEncodingException;
    Boolean phonetxt(Long phone);
    Boolean phonetxta(Long phone);
}
